

<!DOCTYPE html>
<!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]-->
<head>
  <meta charset="utf-8">
  
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta name="Description" content="scikit-learn: machine learning in Python">

  
  <title>Version 0.17.1 &mdash; scikit-learn 0.22 documentation</title>
  
  <link rel="canonical" href="http://scikit-learn.org/stable/whats_new/v0.17.html" />

  
  <link rel="shortcut icon" href="../_static/favicon.ico"/>
  

  <link rel="stylesheet" href="../_static/css/vendor/bootstrap.min.css" type="text/css" />
  <link rel="stylesheet" href="../_static/gallery.css" type="text/css" />
  <link rel="stylesheet" href="../_static/css/theme.css" type="text/css" />
<script id="documentation_options" data-url_root="../" src="../_static/documentation_options.js"></script>
<script src="../_static/jquery.js"></script> 
</head>
<body>
<nav id="navbar" class="sk-docs-navbar navbar navbar-expand-md navbar-light bg-light py-0">
  <div class="container-fluid sk-docs-container px-0">
      <a class="navbar-brand py-0" href="../index.html">
        <img
          class="sk-brand-img"
          src="../_static/scikit-learn-logo-small.png"
          alt="logo"/>
      </a>
    <button
      id="sk-navbar-toggler"
      class="navbar-toggler"
      type="button"
      data-toggle="collapse"
      data-target="#navbarSupportedContent"
      aria-controls="navbarSupportedContent"
      aria-expanded="false"
      aria-label="Toggle navigation"
    >
      <span class="navbar-toggler-icon"></span>
    </button>

    <div class="sk-navbar-collapse collapse navbar-collapse" id="navbarSupportedContent">
      <ul class="navbar-nav mr-auto">
        <li class="nav-item">
          <a class="sk-nav-link nav-link" href="../install.html">Install</a>
        </li>
        <li class="nav-item">
          <a class="sk-nav-link nav-link" href="../user_guide.html">User Guide</a>
        </li>
        <li class="nav-item">
          <a class="sk-nav-link nav-link" href="../modules/classes.html">API</a>
        </li>
        <li class="nav-item">
          <a class="sk-nav-link nav-link" href="../auto_examples/index.html">Examples</a>
        </li>
        <li class="nav-item">
          <a class="sk-nav-link nav-link nav-more-item-mobile-items" href="../getting_started.html">Getting Started</a>
        </li>
        <li class="nav-item">
          <a class="sk-nav-link nav-link nav-more-item-mobile-items" href="../tutorial/index.html">Tutorial</a>
        </li>
        <li class="nav-item">
          <a class="sk-nav-link nav-link nav-more-item-mobile-items" href="../glossary.html">Glossary</a>
        </li>
        <li class="nav-item">
          <a class="sk-nav-link nav-link nav-more-item-mobile-items" href="../developers/index.html">Development</a>
        </li>
        <li class="nav-item">
          <a class="sk-nav-link nav-link nav-more-item-mobile-items" href="../faq.html">FAQ</a>
        </li>
        <li class="nav-item">
          <a class="sk-nav-link nav-link nav-more-item-mobile-items" href="../related_projects.html">Related packages</a>
        </li>
        <li class="nav-item">
          <a class="sk-nav-link nav-link nav-more-item-mobile-items" href="../roadmap.html">Roadmap</a>
        </li>
        <li class="nav-item">
          <a class="sk-nav-link nav-link nav-more-item-mobile-items" href="../about.html">About us</a>
        </li>
        <li class="nav-item">
          <a class="sk-nav-link nav-link nav-more-item-mobile-items" href="https://github.com/scikit-learn/scikit-learn">GitHub</a>
        </li>
        <li class="nav-item">
          <a class="sk-nav-link nav-link nav-more-item-mobile-items" href="https://scikit-learn.org/dev/versions.html">Other Versions</a>
        </li>
        <li class="nav-item dropdown nav-more-item-dropdown">
          <a class="sk-nav-link nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">More</a>
          <div class="dropdown-menu" aria-labelledby="navbarDropdown">
              <a class="sk-nav-dropdown-item dropdown-item" href="../getting_started.html">Getting Started</a>
              <a class="sk-nav-dropdown-item dropdown-item" href="../tutorial/index.html">Tutorial</a>
              <a class="sk-nav-dropdown-item dropdown-item" href="../glossary.html">Glossary</a>
              <a class="sk-nav-dropdown-item dropdown-item" href="../developers/index.html">Development</a>
              <a class="sk-nav-dropdown-item dropdown-item" href="../faq.html">FAQ</a>
              <a class="sk-nav-dropdown-item dropdown-item" href="../related_projects.html">Related packages</a>
              <a class="sk-nav-dropdown-item dropdown-item" href="../roadmap.html">Roadmap</a>
              <a class="sk-nav-dropdown-item dropdown-item" href="../about.html">About us</a>
              <a class="sk-nav-dropdown-item dropdown-item" href="https://github.com/scikit-learn/scikit-learn">GitHub</a>
              <a class="sk-nav-dropdown-item dropdown-item" href="https://scikit-learn.org/dev/versions.html">Other Versions</a>
          </div>
        </li>
      </ul>
      <div id="searchbox" role="search">
          <div class="searchformwrapper">
          <form class="search" action="../search.html" method="get">
            <input class="sk-search-text-input" type="text" name="q" aria-labelledby="searchlabel" />
            <input class="sk-search-text-btn" type="submit" value="Go" />
          </form>
          </div>
      </div>
    </div>
  </div>
</nav>
<div class="d-flex" id="sk-doc-wrapper">
    <input type="checkbox" name="sk-toggle-checkbox" id="sk-toggle-checkbox">
    <label id="sk-sidemenu-toggle" class="sk-btn-toggle-toc btn sk-btn-primary" for="sk-toggle-checkbox">Toggle Menu</label>
    <div id="sk-sidebar-wrapper" class="border-right">
      <div class="sk-sidebar-toc-wrapper">
        <div class="sk-sidebar-toc-logo">
          <a href="../index.html">
            <img
              class="sk-brand-img"
              src="../_static/scikit-learn-logo-small.png"
              alt="logo"/>
          </a>
        </div>
        <div class="btn-group w-100 mb-2" role="group" aria-label="rellinks">
            <a href="v0.18.html" role="button" class="btn sk-btn-rellink py-1" sk-rellink-tooltip="Version 0.18.2">Prev</a><a href="../whats_new.html" role="button" class="btn sk-btn-rellink py-1" sk-rellink-tooltip="Release History">Up</a>
            <a href="v0.16.html" role="button" class="btn sk-btn-rellink py-1" sk-rellink-tooltip="Version 0.16.1">Next</a>
        </div>
        <div class="alert alert-danger p-1 mb-2" role="alert">
          <p class="text-center mb-0">
          <strong>scikit-learn 0.22</strong><br/>
          <a href="http://scikit-learn.org/dev/versions.html">Other versions</a>
          </p>
        </div>
        <div class="alert alert-warning p-1 mb-2" role="alert">
          <p class="text-center mb-0">
            Please <a class="font-weight-bold" href="../about.html#citing-scikit-learn"><string>cite us</string></a> if you use the software.
          </p>
        </div>
          <div class="sk-sidebar-toc">
            <ul>
<li><a class="reference internal" href="#">Version 0.17.1</a><ul>
<li><a class="reference internal" href="#changelog">Changelog</a><ul>
<li><a class="reference internal" href="#bug-fixes">Bug fixes</a></li>
</ul>
</li>
</ul>
</li>
<li><a class="reference internal" href="#version-0-17">Version 0.17</a><ul>
<li><a class="reference internal" href="#id1">Changelog</a><ul>
<li><a class="reference internal" href="#new-features">New features</a></li>
<li><a class="reference internal" href="#enhancements">Enhancements</a></li>
<li><a class="reference internal" href="#id2">Bug fixes</a></li>
</ul>
</li>
<li><a class="reference internal" href="#api-changes-summary">API changes summary</a></li>
<li><a class="reference internal" href="#code-contributors">Code Contributors</a></li>
</ul>
</li>
</ul>

          </div>
      </div>
    </div>
    <div id="sk-page-content-wrapper">
      <div class="sk-page-content container-fluid body px-md-3" role="main">
        
  <div class="section" id="version-0-17-1">
<span id="changes-0-17-1"></span><h1>Version 0.17.1<a class="headerlink" href="#version-0-17-1" title="Permalink to this headline">¶</a></h1>
<p><strong>February 18, 2016</strong></p>
<div class="section" id="changelog">
<h2>Changelog<a class="headerlink" href="#changelog" title="Permalink to this headline">¶</a></h2>
<div class="section" id="bug-fixes">
<h3>Bug fixes<a class="headerlink" href="#bug-fixes" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li><p>Upgrade vendored joblib to version 0.9.4 that fixes an important bug in
<code class="docutils literal notranslate"><span class="pre">joblib.Parallel</span></code> that can silently yield to wrong results when working
on datasets larger than 1MB:
<a class="reference external" href="https://github.com/joblib/joblib/blob/0.9.4/CHANGES.rst">https://github.com/joblib/joblib/blob/0.9.4/CHANGES.rst</a></p></li>
<li><p>Fixed reading of Bunch pickles generated with scikit-learn
version &lt;= 0.16. This can affect users who have already
downloaded a dataset with scikit-learn 0.16 and are loading it
with scikit-learn 0.17. See <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/6196">#6196</a> for
how this affected <a class="reference internal" href="../modules/generated/sklearn.datasets.fetch_20newsgroups.html#sklearn.datasets.fetch_20newsgroups" title="sklearn.datasets.fetch_20newsgroups"><code class="xref py py-func docutils literal notranslate"><span class="pre">datasets.fetch_20newsgroups</span></code></a>. By <a class="reference external" href="https://github.com/lesteve">Loic
Esteve</a>.</p></li>
<li><p>Fixed a bug that prevented using ROC AUC score to perform grid search on
several CPU / cores on large arrays. See <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/6147">#6147</a>
By <a class="reference external" href="https://twitter.com/ogrisel">Olivier Grisel</a>.</p></li>
<li><p>Fixed a bug that prevented to properly set the <code class="docutils literal notranslate"><span class="pre">presort</span></code> parameter
in <a class="reference internal" href="../modules/generated/sklearn.ensemble.GradientBoostingRegressor.html#sklearn.ensemble.GradientBoostingRegressor" title="sklearn.ensemble.GradientBoostingRegressor"><code class="xref py py-class docutils literal notranslate"><span class="pre">ensemble.GradientBoostingRegressor</span></code></a>. See <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/5857">#5857</a>
By Andrew McCulloh.</p></li>
<li><p>Fixed a joblib error when evaluating the perplexity of a
<a class="reference internal" href="../modules/generated/sklearn.decomposition.LatentDirichletAllocation.html#sklearn.decomposition.LatentDirichletAllocation" title="sklearn.decomposition.LatentDirichletAllocation"><code class="xref py py-class docutils literal notranslate"><span class="pre">decomposition.LatentDirichletAllocation</span></code></a> model. See <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/6258">#6258</a>
By Chyi-Kwei Yau.</p></li>
</ul>
</div>
</div>
</div>
<div class="section" id="version-0-17">
<span id="changes-0-17"></span><h1>Version 0.17<a class="headerlink" href="#version-0-17" title="Permalink to this headline">¶</a></h1>
<p><strong>November 5, 2015</strong></p>
<div class="section" id="id1">
<h2>Changelog<a class="headerlink" href="#id1" title="Permalink to this headline">¶</a></h2>
<div class="section" id="new-features">
<h3>New features<a class="headerlink" href="#new-features" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li><p>All the Scaler classes but <a class="reference internal" href="../modules/generated/sklearn.preprocessing.RobustScaler.html#sklearn.preprocessing.RobustScaler" title="sklearn.preprocessing.RobustScaler"><code class="xref py py-class docutils literal notranslate"><span class="pre">preprocessing.RobustScaler</span></code></a> can be fitted online by
calling <code class="docutils literal notranslate"><span class="pre">partial_fit</span></code>. By <a class="reference external" href="https://github.com/giorgiop">Giorgio Patrini</a>.</p></li>
<li><p>The new class <a class="reference internal" href="../modules/generated/sklearn.ensemble.VotingClassifier.html#sklearn.ensemble.VotingClassifier" title="sklearn.ensemble.VotingClassifier"><code class="xref py py-class docutils literal notranslate"><span class="pre">ensemble.VotingClassifier</span></code></a> implements a
“majority rule” / “soft voting” ensemble classifier to combine
estimators for classification. By <a class="reference external" href="https://sebastianraschka.com/">Sebastian Raschka</a>.</p></li>
<li><p>The new class <a class="reference internal" href="../modules/generated/sklearn.preprocessing.RobustScaler.html#sklearn.preprocessing.RobustScaler" title="sklearn.preprocessing.RobustScaler"><code class="xref py py-class docutils literal notranslate"><span class="pre">preprocessing.RobustScaler</span></code></a> provides an
alternative to <a class="reference internal" href="../modules/generated/sklearn.preprocessing.StandardScaler.html#sklearn.preprocessing.StandardScaler" title="sklearn.preprocessing.StandardScaler"><code class="xref py py-class docutils literal notranslate"><span class="pre">preprocessing.StandardScaler</span></code></a> for feature-wise
centering and range normalization that is robust to outliers.
By <a class="reference external" href="https://github.com/untom">Thomas Unterthiner</a>.</p></li>
<li><p>The new class <a class="reference internal" href="../modules/generated/sklearn.preprocessing.MaxAbsScaler.html#sklearn.preprocessing.MaxAbsScaler" title="sklearn.preprocessing.MaxAbsScaler"><code class="xref py py-class docutils literal notranslate"><span class="pre">preprocessing.MaxAbsScaler</span></code></a> provides an
alternative to <a class="reference internal" href="../modules/generated/sklearn.preprocessing.MinMaxScaler.html#sklearn.preprocessing.MinMaxScaler" title="sklearn.preprocessing.MinMaxScaler"><code class="xref py py-class docutils literal notranslate"><span class="pre">preprocessing.MinMaxScaler</span></code></a> for feature-wise
range normalization when the data is already centered or sparse.
By <a class="reference external" href="https://github.com/untom">Thomas Unterthiner</a>.</p></li>
<li><p>The new class <a class="reference internal" href="../modules/generated/sklearn.preprocessing.FunctionTransformer.html#sklearn.preprocessing.FunctionTransformer" title="sklearn.preprocessing.FunctionTransformer"><code class="xref py py-class docutils literal notranslate"><span class="pre">preprocessing.FunctionTransformer</span></code></a> turns a Python
function into a <code class="docutils literal notranslate"><span class="pre">Pipeline</span></code>-compatible transformer object.
By Joe Jevnik.</p></li>
<li><p>The new classes <code class="xref py py-class docutils literal notranslate"><span class="pre">cross_validation.LabelKFold</span></code> and
<code class="xref py py-class docutils literal notranslate"><span class="pre">cross_validation.LabelShuffleSplit</span></code> generate train-test folds,
respectively similar to <code class="xref py py-class docutils literal notranslate"><span class="pre">cross_validation.KFold</span></code> and
<code class="xref py py-class docutils literal notranslate"><span class="pre">cross_validation.ShuffleSplit</span></code>, except that the folds are
conditioned on a label array. By <a class="reference external" href="https://bmcfee.github.io">Brian McFee</a>, <a class="reference external" href="https://github.com/JeanKossaifi">Jean
Kossaifi</a> and <a class="reference external" href="http://www.montefiore.ulg.ac.be/~glouppe/">Gilles Louppe</a>.</p></li>
<li><p><a class="reference internal" href="../modules/generated/sklearn.decomposition.LatentDirichletAllocation.html#sklearn.decomposition.LatentDirichletAllocation" title="sklearn.decomposition.LatentDirichletAllocation"><code class="xref py py-class docutils literal notranslate"><span class="pre">decomposition.LatentDirichletAllocation</span></code></a> implements the Latent
Dirichlet Allocation topic model with online  variational
inference. By <a class="reference external" href="https://github.com/chyikwei">Chyi-Kwei Yau</a>, with code based on an implementation
by Matt Hoffman. (<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/3659">#3659</a>)</p></li>
<li><p>The new solver <code class="docutils literal notranslate"><span class="pre">sag</span></code> implements a Stochastic Average Gradient descent
and is available in both <a class="reference internal" href="../modules/generated/sklearn.linear_model.LogisticRegression.html#sklearn.linear_model.LogisticRegression" title="sklearn.linear_model.LogisticRegression"><code class="xref py py-class docutils literal notranslate"><span class="pre">linear_model.LogisticRegression</span></code></a> and
<a class="reference internal" href="../modules/generated/sklearn.linear_model.Ridge.html#sklearn.linear_model.Ridge" title="sklearn.linear_model.Ridge"><code class="xref py py-class docutils literal notranslate"><span class="pre">linear_model.Ridge</span></code></a>. This solver is very efficient for large
datasets. By <a class="reference external" href="https://github.com/dsullivan7">Danny Sullivan</a> and <a class="reference external" href="https://github.com/TomDLT">Tom Dupre la Tour</a>.
(<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/4738">#4738</a>)</p></li>
<li><p>The new solver <code class="docutils literal notranslate"><span class="pre">cd</span></code> implements a Coordinate Descent in
<a class="reference internal" href="../modules/generated/sklearn.decomposition.NMF.html#sklearn.decomposition.NMF" title="sklearn.decomposition.NMF"><code class="xref py py-class docutils literal notranslate"><span class="pre">decomposition.NMF</span></code></a>. Previous solver based on Projected Gradient is
still available setting new parameter <code class="docutils literal notranslate"><span class="pre">solver</span></code> to <code class="docutils literal notranslate"><span class="pre">pg</span></code>, but is
deprecated and will be removed in 0.19, along with
<code class="xref py py-class docutils literal notranslate"><span class="pre">decomposition.ProjectedGradientNMF</span></code> and parameters <code class="docutils literal notranslate"><span class="pre">sparseness</span></code>,
<code class="docutils literal notranslate"><span class="pre">eta</span></code>, <code class="docutils literal notranslate"><span class="pre">beta</span></code> and <code class="docutils literal notranslate"><span class="pre">nls_max_iter</span></code>. New parameters <code class="docutils literal notranslate"><span class="pre">alpha</span></code> and
<code class="docutils literal notranslate"><span class="pre">l1_ratio</span></code> control L1 and L2 regularization, and <code class="docutils literal notranslate"><span class="pre">shuffle</span></code> adds a
shuffling step in the <code class="docutils literal notranslate"><span class="pre">cd</span></code> solver.
By <a class="reference external" href="https://github.com/TomDLT">Tom Dupre la Tour</a> and <a class="reference external" href="http://www.mblondel.org">Mathieu Blondel</a>.</p></li>
</ul>
</div>
<div class="section" id="enhancements">
<h3>Enhancements<a class="headerlink" href="#enhancements" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li><p><a class="reference internal" href="../modules/generated/sklearn.manifold.TSNE.html#sklearn.manifold.TSNE" title="sklearn.manifold.TSNE"><code class="xref py py-class docutils literal notranslate"><span class="pre">manifold.TSNE</span></code></a> now supports approximate optimization via the
Barnes-Hut method, leading to much faster fitting. By Christopher Erick Moody.
(<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/4025">#4025</a>)</p></li>
<li><p><code class="xref py py-class docutils literal notranslate"><span class="pre">cluster.mean_shift_.MeanShift</span></code> now supports parallel execution,
as implemented in the <code class="docutils literal notranslate"><span class="pre">mean_shift</span></code> function. By <a class="reference external" href="https://github.com/martinosorb">Martino
Sorbaro</a>.</p></li>
<li><p><a class="reference internal" href="../modules/generated/sklearn.naive_bayes.GaussianNB.html#sklearn.naive_bayes.GaussianNB" title="sklearn.naive_bayes.GaussianNB"><code class="xref py py-class docutils literal notranslate"><span class="pre">naive_bayes.GaussianNB</span></code></a> now supports fitting with <code class="docutils literal notranslate"><span class="pre">sample_weight</span></code>.
By <a class="reference external" href="https://jmetzen.github.io/">Jan Hendrik Metzen</a>.</p></li>
<li><p><a class="reference internal" href="../modules/generated/sklearn.dummy.DummyClassifier.html#sklearn.dummy.DummyClassifier" title="sklearn.dummy.DummyClassifier"><code class="xref py py-class docutils literal notranslate"><span class="pre">dummy.DummyClassifier</span></code></a> now supports a prior fitting strategy.
By <a class="reference external" href="http://www.ajoly.org">Arnaud Joly</a>.</p></li>
<li><p>Added a <code class="docutils literal notranslate"><span class="pre">fit_predict</span></code> method for <code class="xref py py-class docutils literal notranslate"><span class="pre">mixture.GMM</span></code> and subclasses.
By <a class="reference external" href="https://github.com/clorenz7">Cory Lorenz</a>.</p></li>
<li><p>Added the <a class="reference internal" href="../modules/generated/sklearn.metrics.label_ranking_loss.html#sklearn.metrics.label_ranking_loss" title="sklearn.metrics.label_ranking_loss"><code class="xref py py-func docutils literal notranslate"><span class="pre">metrics.label_ranking_loss</span></code></a> metric.
By <a class="reference external" href="http://www.ajoly.org">Arnaud Joly</a>.</p></li>
<li><p>Added the <a class="reference internal" href="../modules/generated/sklearn.metrics.cohen_kappa_score.html#sklearn.metrics.cohen_kappa_score" title="sklearn.metrics.cohen_kappa_score"><code class="xref py py-func docutils literal notranslate"><span class="pre">metrics.cohen_kappa_score</span></code></a> metric.</p></li>
<li><p>Added a <code class="docutils literal notranslate"><span class="pre">warm_start</span></code> constructor parameter to the bagging ensemble
models to increase the size of the ensemble. By <a class="reference external" href="https://github.com/betatim">Tim Head</a>.</p></li>
<li><p>Added option to use multi-output regression metrics without averaging.
By Konstantin Shmelkov and <a class="reference external" href="https://github.com/eickenberg">Michael Eickenberg</a>.</p></li>
<li><p>Added <code class="docutils literal notranslate"><span class="pre">stratify</span></code> option to <code class="xref py py-func docutils literal notranslate"><span class="pre">cross_validation.train_test_split</span></code>
for stratified splitting. By Miroslav Batchkarov.</p></li>
<li><p>The <a class="reference internal" href="../modules/generated/sklearn.tree.export_graphviz.html#sklearn.tree.export_graphviz" title="sklearn.tree.export_graphviz"><code class="xref py py-func docutils literal notranslate"><span class="pre">tree.export_graphviz</span></code></a> function now supports aesthetic
improvements for <a class="reference internal" href="../modules/generated/sklearn.tree.DecisionTreeClassifier.html#sklearn.tree.DecisionTreeClassifier" title="sklearn.tree.DecisionTreeClassifier"><code class="xref py py-class docutils literal notranslate"><span class="pre">tree.DecisionTreeClassifier</span></code></a> and
<a class="reference internal" href="../modules/generated/sklearn.tree.DecisionTreeRegressor.html#sklearn.tree.DecisionTreeRegressor" title="sklearn.tree.DecisionTreeRegressor"><code class="xref py py-class docutils literal notranslate"><span class="pre">tree.DecisionTreeRegressor</span></code></a>, including options for coloring nodes
by their majority class or impurity, showing variable names, and using
node proportions instead of raw sample counts. By <a class="reference external" href="http://trevorstephens.com/">Trevor Stephens</a>.</p></li>
<li><p>Improved speed of <code class="docutils literal notranslate"><span class="pre">newton-cg</span></code> solver in
<a class="reference internal" href="../modules/generated/sklearn.linear_model.LogisticRegression.html#sklearn.linear_model.LogisticRegression" title="sklearn.linear_model.LogisticRegression"><code class="xref py py-class docutils literal notranslate"><span class="pre">linear_model.LogisticRegression</span></code></a>, by avoiding loss computation.
By <a class="reference external" href="http://www.mblondel.org">Mathieu Blondel</a> and <a class="reference external" href="https://github.com/TomDLT">Tom Dupre la Tour</a>.</p></li>
<li><p>The <code class="docutils literal notranslate"><span class="pre">class_weight=&quot;auto&quot;</span></code> heuristic in classifiers supporting
<code class="docutils literal notranslate"><span class="pre">class_weight</span></code> was deprecated and replaced by the <code class="docutils literal notranslate"><span class="pre">class_weight=&quot;balanced&quot;</span></code>
option, which has a simpler formula and interpretation.
By <a class="reference external" href="https://dirichlet.net/">Hanna Wallach</a> and <a class="reference external" href="https://amueller.github.io/">Andreas Müller</a>.</p></li>
<li><p>Add <code class="docutils literal notranslate"><span class="pre">class_weight</span></code> parameter to automatically weight samples by class
frequency for <a class="reference internal" href="../modules/generated/sklearn.linear_model.PassiveAggressiveClassifier.html#sklearn.linear_model.PassiveAggressiveClassifier" title="sklearn.linear_model.PassiveAggressiveClassifier"><code class="xref py py-class docutils literal notranslate"><span class="pre">linear_model.PassiveAggressiveClassifier</span></code></a>. By
<a class="reference external" href="http://trevorstephens.com/">Trevor Stephens</a>.</p></li>
<li><p>Added backlinks from the API reference pages to the user guide. By
<a class="reference external" href="https://amueller.github.io/">Andreas Müller</a>.</p></li>
<li><p>The <code class="docutils literal notranslate"><span class="pre">labels</span></code> parameter to <a class="reference internal" href="../modules/generated/sklearn.metrics.f1_score.html#sklearn.metrics.f1_score" title="sklearn.metrics.f1_score"><code class="xref py py-func docutils literal notranslate"><span class="pre">sklearn.metrics.f1_score</span></code></a>,
<a class="reference internal" href="../modules/generated/sklearn.metrics.fbeta_score.html#sklearn.metrics.fbeta_score" title="sklearn.metrics.fbeta_score"><code class="xref py py-func docutils literal notranslate"><span class="pre">sklearn.metrics.fbeta_score</span></code></a>,
<a class="reference internal" href="../modules/generated/sklearn.metrics.recall_score.html#sklearn.metrics.recall_score" title="sklearn.metrics.recall_score"><code class="xref py py-func docutils literal notranslate"><span class="pre">sklearn.metrics.recall_score</span></code></a> and
<a class="reference internal" href="../modules/generated/sklearn.metrics.precision_score.html#sklearn.metrics.precision_score" title="sklearn.metrics.precision_score"><code class="xref py py-func docutils literal notranslate"><span class="pre">sklearn.metrics.precision_score</span></code></a> has been extended.
It is now possible to ignore one or more labels, such as where
a multiclass problem has a majority class to ignore. By <a class="reference external" href="https://joelnothman.com/">Joel Nothman</a>.</p></li>
<li><p>Add <code class="docutils literal notranslate"><span class="pre">sample_weight</span></code> support to <a class="reference internal" href="../modules/generated/sklearn.linear_model.RidgeClassifier.html#sklearn.linear_model.RidgeClassifier" title="sklearn.linear_model.RidgeClassifier"><code class="xref py py-class docutils literal notranslate"><span class="pre">linear_model.RidgeClassifier</span></code></a>.
By <a class="reference external" href="http://trevorstephens.com/">Trevor Stephens</a>.</p></li>
<li><p>Provide an option for sparse output from
<a class="reference internal" href="../modules/generated/sklearn.metrics.pairwise.cosine_similarity.html#sklearn.metrics.pairwise.cosine_similarity" title="sklearn.metrics.pairwise.cosine_similarity"><code class="xref py py-func docutils literal notranslate"><span class="pre">sklearn.metrics.pairwise.cosine_similarity</span></code></a>. By
<a class="reference external" href="https://github.com/jaidevd">Jaidev Deshpande</a>.</p></li>
<li><p>Add <code class="xref py py-func docutils literal notranslate"><span class="pre">minmax_scale</span></code> to provide a function interface for
<code class="xref py py-class docutils literal notranslate"><span class="pre">MinMaxScaler</span></code>. By <a class="reference external" href="https://github.com/untom">Thomas Unterthiner</a>.</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">dump_svmlight_file</span></code> now handles multi-label datasets.
By Chih-Wei Chang.</p></li>
<li><p>RCV1 dataset loader (<a class="reference internal" href="../modules/generated/sklearn.datasets.fetch_rcv1.html#sklearn.datasets.fetch_rcv1" title="sklearn.datasets.fetch_rcv1"><code class="xref py py-func docutils literal notranslate"><span class="pre">sklearn.datasets.fetch_rcv1</span></code></a>).
By <a class="reference external" href="https://github.com/TomDLT">Tom Dupre la Tour</a>.</p></li>
<li><p>The “Wisconsin Breast Cancer” classical two-class classification dataset
is now included in scikit-learn, available with
<code class="xref py py-func docutils literal notranslate"><span class="pre">sklearn.dataset.load_breast_cancer</span></code>.</p></li>
<li><p>Upgraded to joblib 0.9.3 to benefit from the new automatic batching of
short tasks. This makes it possible for scikit-learn to benefit from
parallelism when many very short tasks are executed in parallel, for
instance by the <code class="xref py py-class docutils literal notranslate"><span class="pre">grid_search.GridSearchCV</span></code> meta-estimator
with <code class="docutils literal notranslate"><span class="pre">n_jobs</span> <span class="pre">&gt;</span> <span class="pre">1</span></code> used with a large grid of parameters on a small
dataset. By <a class="reference external" href="https://vene.ro/">Vlad Niculae</a>, <a class="reference external" href="https://twitter.com/ogrisel">Olivier Grisel</a> and <a class="reference external" href="https://github.com/lesteve">Loic Esteve</a>.</p></li>
<li><p>For more details about changes in joblib 0.9.3 see the release notes:
<a class="reference external" href="https://github.com/joblib/joblib/blob/master/CHANGES.rst#release-093">https://github.com/joblib/joblib/blob/master/CHANGES.rst#release-093</a></p></li>
<li><p>Improved speed (3 times per iteration) of
<code class="xref py py-class docutils literal notranslate"><span class="pre">decomposition.DictLearning</span></code> with coordinate descent method
from <a class="reference internal" href="../modules/generated/sklearn.linear_model.Lasso.html#sklearn.linear_model.Lasso" title="sklearn.linear_model.Lasso"><code class="xref py py-class docutils literal notranslate"><span class="pre">linear_model.Lasso</span></code></a>. By <a class="reference external" href="https://github.com/arthurmensch">Arthur Mensch</a>.</p></li>
<li><p>Parallel processing (threaded) for queries of nearest neighbors
(using the ball-tree) by Nikolay Mayorov.</p></li>
<li><p>Allow <a class="reference internal" href="../modules/generated/sklearn.datasets.make_multilabel_classification.html#sklearn.datasets.make_multilabel_classification" title="sklearn.datasets.make_multilabel_classification"><code class="xref py py-func docutils literal notranslate"><span class="pre">datasets.make_multilabel_classification</span></code></a> to output
a sparse <code class="docutils literal notranslate"><span class="pre">y</span></code>. By Kashif Rasul.</p></li>
<li><p><a class="reference internal" href="../modules/generated/sklearn.cluster.DBSCAN.html#sklearn.cluster.DBSCAN" title="sklearn.cluster.DBSCAN"><code class="xref py py-class docutils literal notranslate"><span class="pre">cluster.DBSCAN</span></code></a> now accepts a sparse matrix of precomputed
distances, allowing memory-efficient distance precomputation. By
<a class="reference external" href="https://joelnothman.com/">Joel Nothman</a>.</p></li>
<li><p><a class="reference internal" href="../modules/generated/sklearn.tree.DecisionTreeClassifier.html#sklearn.tree.DecisionTreeClassifier" title="sklearn.tree.DecisionTreeClassifier"><code class="xref py py-class docutils literal notranslate"><span class="pre">tree.DecisionTreeClassifier</span></code></a> now exposes an <code class="docutils literal notranslate"><span class="pre">apply</span></code> method
for retrieving the leaf indices samples are predicted as. By
<a class="reference external" href="https://github.com/galv">Daniel Galvez</a> and <a class="reference external" href="http://www.montefiore.ulg.ac.be/~glouppe/">Gilles Louppe</a>.</p></li>
<li><p>Speed up decision tree regressors, random forest regressors, extra trees
regressors and gradient boosting estimators by computing a proxy
of the impurity improvement during the tree growth. The proxy quantity is
such that the split that maximizes this value also maximizes the impurity
improvement. By <a class="reference external" href="http://www.ajoly.org">Arnaud Joly</a>, <a class="reference external" href="https://github.com/jmschrei">Jacob Schreiber</a>
and <a class="reference external" href="http://www.montefiore.ulg.ac.be/~glouppe/">Gilles Louppe</a>.</p></li>
<li><p>Speed up tree based methods by reducing the number of computations needed
when computing the impurity measure taking into account linear
relationship of the computed statistics. The effect is particularly
visible with extra trees and on datasets with categorical or sparse
features. By <a class="reference external" href="http://www.ajoly.org">Arnaud Joly</a>.</p></li>
<li><p><a class="reference internal" href="../modules/generated/sklearn.ensemble.GradientBoostingRegressor.html#sklearn.ensemble.GradientBoostingRegressor" title="sklearn.ensemble.GradientBoostingRegressor"><code class="xref py py-class docutils literal notranslate"><span class="pre">ensemble.GradientBoostingRegressor</span></code></a> and
<a class="reference internal" href="../modules/generated/sklearn.ensemble.GradientBoostingClassifier.html#sklearn.ensemble.GradientBoostingClassifier" title="sklearn.ensemble.GradientBoostingClassifier"><code class="xref py py-class docutils literal notranslate"><span class="pre">ensemble.GradientBoostingClassifier</span></code></a> now expose an <code class="docutils literal notranslate"><span class="pre">apply</span></code>
method for retrieving the leaf indices each sample ends up in under
each try. By <a class="reference external" href="https://github.com/jmschrei">Jacob Schreiber</a>.</p></li>
<li><p>Add <code class="docutils literal notranslate"><span class="pre">sample_weight</span></code> support to <a class="reference internal" href="../modules/generated/sklearn.linear_model.LinearRegression.html#sklearn.linear_model.LinearRegression" title="sklearn.linear_model.LinearRegression"><code class="xref py py-class docutils literal notranslate"><span class="pre">linear_model.LinearRegression</span></code></a>.
By Sonny Hu. (<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/#4881">##4881</a>)</p></li>
<li><p>Add <code class="docutils literal notranslate"><span class="pre">n_iter_without_progress</span></code> to <a class="reference internal" href="../modules/generated/sklearn.manifold.TSNE.html#sklearn.manifold.TSNE" title="sklearn.manifold.TSNE"><code class="xref py py-class docutils literal notranslate"><span class="pre">manifold.TSNE</span></code></a> to control
the stopping criterion. By Santi Villalba. (<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/5186">#5186</a>)</p></li>
<li><p>Added optional parameter <code class="docutils literal notranslate"><span class="pre">random_state</span></code> in <a class="reference internal" href="../modules/generated/sklearn.linear_model.Ridge.html#sklearn.linear_model.Ridge" title="sklearn.linear_model.Ridge"><code class="xref py py-class docutils literal notranslate"><span class="pre">linear_model.Ridge</span></code></a>
, to set the seed of the pseudo random generator used in <code class="docutils literal notranslate"><span class="pre">sag</span></code> solver. By <a class="reference external" href="https://github.com/TomDLT">Tom Dupre la Tour</a>.</p></li>
<li><p>Added optional parameter <code class="docutils literal notranslate"><span class="pre">warm_start</span></code> in
<a class="reference internal" href="../modules/generated/sklearn.linear_model.LogisticRegression.html#sklearn.linear_model.LogisticRegression" title="sklearn.linear_model.LogisticRegression"><code class="xref py py-class docutils literal notranslate"><span class="pre">linear_model.LogisticRegression</span></code></a>. If set to True, the solvers
<code class="docutils literal notranslate"><span class="pre">lbfgs</span></code>, <code class="docutils literal notranslate"><span class="pre">newton-cg</span></code> and <code class="docutils literal notranslate"><span class="pre">sag</span></code> will be initialized with the
coefficients computed in the previous fit. By <a class="reference external" href="https://github.com/TomDLT">Tom Dupre la Tour</a>.</p></li>
<li><p>Added <code class="docutils literal notranslate"><span class="pre">sample_weight</span></code> support to <a class="reference internal" href="../modules/generated/sklearn.linear_model.LogisticRegression.html#sklearn.linear_model.LogisticRegression" title="sklearn.linear_model.LogisticRegression"><code class="xref py py-class docutils literal notranslate"><span class="pre">linear_model.LogisticRegression</span></code></a> for
the <code class="docutils literal notranslate"><span class="pre">lbfgs</span></code>, <code class="docutils literal notranslate"><span class="pre">newton-cg</span></code>, and <code class="docutils literal notranslate"><span class="pre">sag</span></code> solvers. By <a class="reference external" href="http://www.vstolbunov.com">Valentin Stolbunov</a>.
Support added to the <code class="docutils literal notranslate"><span class="pre">liblinear</span></code> solver. By <a class="reference external" href="https://manojbits.wordpress.com">Manoj Kumar</a>.</p></li>
<li><p>Added optional parameter <code class="docutils literal notranslate"><span class="pre">presort</span></code> to <a class="reference internal" href="../modules/generated/sklearn.ensemble.GradientBoostingRegressor.html#sklearn.ensemble.GradientBoostingRegressor" title="sklearn.ensemble.GradientBoostingRegressor"><code class="xref py py-class docutils literal notranslate"><span class="pre">ensemble.GradientBoostingRegressor</span></code></a>
and <a class="reference internal" href="../modules/generated/sklearn.ensemble.GradientBoostingClassifier.html#sklearn.ensemble.GradientBoostingClassifier" title="sklearn.ensemble.GradientBoostingClassifier"><code class="xref py py-class docutils literal notranslate"><span class="pre">ensemble.GradientBoostingClassifier</span></code></a>, keeping default behavior
the same. This allows gradient boosters to turn off presorting when building
deep trees or using sparse data. By <a class="reference external" href="https://github.com/jmschrei">Jacob Schreiber</a>.</p></li>
<li><p>Altered <a class="reference internal" href="../modules/generated/sklearn.metrics.roc_curve.html#sklearn.metrics.roc_curve" title="sklearn.metrics.roc_curve"><code class="xref py py-func docutils literal notranslate"><span class="pre">metrics.roc_curve</span></code></a> to drop unnecessary thresholds by
default. By <a class="reference external" href="https://github.com/gclenaghan">Graham Clenaghan</a>.</p></li>
<li><p>Added <a class="reference internal" href="../modules/generated/sklearn.feature_selection.SelectFromModel.html#sklearn.feature_selection.SelectFromModel" title="sklearn.feature_selection.SelectFromModel"><code class="xref py py-class docutils literal notranslate"><span class="pre">feature_selection.SelectFromModel</span></code></a> meta-transformer which can
be used along with estimators that have <code class="docutils literal notranslate"><span class="pre">coef_</span></code> or <code class="docutils literal notranslate"><span class="pre">feature_importances_</span></code>
attribute to select important features of the input data. By
<a class="reference external" href="https://github.com/maheshakya">Maheshakya Wijewardena</a>, <a class="reference external" href="https://joelnothman.com/">Joel Nothman</a> and <a class="reference external" href="https://manojbits.wordpress.com">Manoj Kumar</a>.</p></li>
<li><p>Added <a class="reference internal" href="../modules/generated/sklearn.metrics.pairwise.laplacian_kernel.html#sklearn.metrics.pairwise.laplacian_kernel" title="sklearn.metrics.pairwise.laplacian_kernel"><code class="xref py py-func docutils literal notranslate"><span class="pre">metrics.pairwise.laplacian_kernel</span></code></a>.  By <a class="reference external" href="https://github.com/Clyde-fare">Clyde Fare</a>.</p></li>
<li><p><code class="xref py py-class docutils literal notranslate"><span class="pre">covariance.GraphLasso</span></code> allows separate control of the convergence criterion
for the Elastic-Net subproblem via  the <code class="docutils literal notranslate"><span class="pre">enet_tol</span></code> parameter.</p></li>
<li><p>Improved verbosity in <a class="reference internal" href="../modules/generated/sklearn.decomposition.DictionaryLearning.html#sklearn.decomposition.DictionaryLearning" title="sklearn.decomposition.DictionaryLearning"><code class="xref py py-class docutils literal notranslate"><span class="pre">decomposition.DictionaryLearning</span></code></a>.</p></li>
<li><p><a class="reference internal" href="../modules/generated/sklearn.ensemble.RandomForestClassifier.html#sklearn.ensemble.RandomForestClassifier" title="sklearn.ensemble.RandomForestClassifier"><code class="xref py py-class docutils literal notranslate"><span class="pre">ensemble.RandomForestClassifier</span></code></a> and
<a class="reference internal" href="../modules/generated/sklearn.ensemble.RandomForestRegressor.html#sklearn.ensemble.RandomForestRegressor" title="sklearn.ensemble.RandomForestRegressor"><code class="xref py py-class docutils literal notranslate"><span class="pre">ensemble.RandomForestRegressor</span></code></a> no longer explicitly store the
samples used in bagging, resulting in a much reduced memory footprint for
storing random forest models.</p></li>
<li><p>Added <code class="docutils literal notranslate"><span class="pre">positive</span></code> option to <a class="reference internal" href="../modules/generated/sklearn.linear_model.Lars.html#sklearn.linear_model.Lars" title="sklearn.linear_model.Lars"><code class="xref py py-class docutils literal notranslate"><span class="pre">linear_model.Lars</span></code></a> and
<a class="reference internal" href="../modules/generated/sklearn.linear_model.lars_path.html#sklearn.linear_model.lars_path" title="sklearn.linear_model.lars_path"><code class="xref py py-func docutils literal notranslate"><span class="pre">linear_model.lars_path</span></code></a> to force coefficients to be positive.
(<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/5131">#5131</a>)</p></li>
<li><p>Added the <code class="docutils literal notranslate"><span class="pre">X_norm_squared</span></code> parameter to <a class="reference internal" href="../modules/generated/sklearn.metrics.pairwise.euclidean_distances.html#sklearn.metrics.pairwise.euclidean_distances" title="sklearn.metrics.pairwise.euclidean_distances"><code class="xref py py-func docutils literal notranslate"><span class="pre">metrics.pairwise.euclidean_distances</span></code></a>
to provide precomputed squared norms for <code class="docutils literal notranslate"><span class="pre">X</span></code>.</p></li>
<li><p>Added the <code class="docutils literal notranslate"><span class="pre">fit_predict</span></code> method to <a class="reference internal" href="../modules/generated/sklearn.pipeline.Pipeline.html#sklearn.pipeline.Pipeline" title="sklearn.pipeline.Pipeline"><code class="xref py py-class docutils literal notranslate"><span class="pre">pipeline.Pipeline</span></code></a>.</p></li>
<li><p>Added the <code class="xref py py-func docutils literal notranslate"><span class="pre">preprocessing.min_max_scale</span></code> function.</p></li>
</ul>
</div>
<div class="section" id="id2">
<h3>Bug fixes<a class="headerlink" href="#id2" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li><p>Fixed non-determinism in <a class="reference internal" href="../modules/generated/sklearn.dummy.DummyClassifier.html#sklearn.dummy.DummyClassifier" title="sklearn.dummy.DummyClassifier"><code class="xref py py-class docutils literal notranslate"><span class="pre">dummy.DummyClassifier</span></code></a> with sparse
multi-label output. By <a class="reference external" href="https://amueller.github.io/">Andreas Müller</a>.</p></li>
<li><p>Fixed the output shape of <a class="reference internal" href="../modules/generated/sklearn.linear_model.RANSACRegressor.html#sklearn.linear_model.RANSACRegressor" title="sklearn.linear_model.RANSACRegressor"><code class="xref py py-class docutils literal notranslate"><span class="pre">linear_model.RANSACRegressor</span></code></a> to
<code class="docutils literal notranslate"><span class="pre">(n_samples,</span> <span class="pre">)</span></code>. By <a class="reference external" href="https://amueller.github.io/">Andreas Müller</a>.</p></li>
<li><p>Fixed bug in <code class="xref py py-class docutils literal notranslate"><span class="pre">decomposition.DictLearning</span></code> when <code class="docutils literal notranslate"><span class="pre">n_jobs</span> <span class="pre">&lt;</span> <span class="pre">0</span></code>. By
<a class="reference external" href="https://amueller.github.io/">Andreas Müller</a>.</p></li>
<li><p>Fixed bug where <code class="xref py py-class docutils literal notranslate"><span class="pre">grid_search.RandomizedSearchCV</span></code> could consume a
lot of memory for large discrete grids. By <a class="reference external" href="https://joelnothman.com/">Joel Nothman</a>.</p></li>
<li><p>Fixed bug in <a class="reference internal" href="../modules/generated/sklearn.linear_model.LogisticRegressionCV.html#sklearn.linear_model.LogisticRegressionCV" title="sklearn.linear_model.LogisticRegressionCV"><code class="xref py py-class docutils literal notranslate"><span class="pre">linear_model.LogisticRegressionCV</span></code></a> where <code class="docutils literal notranslate"><span class="pre">penalty</span></code> was ignored
in the final fit. By <a class="reference external" href="https://manojbits.wordpress.com">Manoj Kumar</a>.</p></li>
<li><p>Fixed bug in <code class="xref py py-class docutils literal notranslate"><span class="pre">ensemble.forest.ForestClassifier</span></code> while computing
oob_score and X is a sparse.csc_matrix. By <a class="reference external" href="https://github.com/ankurankan">Ankur Ankan</a>.</p></li>
<li><p>All regressors now consistently handle and warn when given <code class="docutils literal notranslate"><span class="pre">y</span></code> that is of
shape <code class="docutils literal notranslate"><span class="pre">(n_samples,</span> <span class="pre">1)</span></code>. By <a class="reference external" href="https://amueller.github.io/">Andreas Müller</a> and Henry Lin.
(<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/5431">#5431</a>)</p></li>
<li><p>Fix in <a class="reference internal" href="../modules/generated/sklearn.cluster.KMeans.html#sklearn.cluster.KMeans" title="sklearn.cluster.KMeans"><code class="xref py py-class docutils literal notranslate"><span class="pre">cluster.KMeans</span></code></a> cluster reassignment for sparse input by
<a class="reference external" href="https://github.com/larsmans">Lars Buitinck</a>.</p></li>
<li><p>Fixed a bug in <code class="xref py py-class docutils literal notranslate"><span class="pre">lda.LDA</span></code> that could cause asymmetric covariance
matrices when using shrinkage. By <a class="reference external" href="https://tnsre.embs.org/author/martinbillinger/">Martin Billinger</a>.</p></li>
<li><p>Fixed <code class="xref py py-func docutils literal notranslate"><span class="pre">cross_validation.cross_val_predict</span></code> for estimators with
sparse predictions. By Buddha Prakash.</p></li>
<li><p>Fixed the <code class="docutils literal notranslate"><span class="pre">predict_proba</span></code> method of <a class="reference internal" href="../modules/generated/sklearn.linear_model.LogisticRegression.html#sklearn.linear_model.LogisticRegression" title="sklearn.linear_model.LogisticRegression"><code class="xref py py-class docutils literal notranslate"><span class="pre">linear_model.LogisticRegression</span></code></a>
to use soft-max instead of one-vs-rest normalization. By <a class="reference external" href="https://manojbits.wordpress.com">Manoj Kumar</a>.
(<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/5182">#5182</a>)</p></li>
<li><p>Fixed the <code class="xref py py-func docutils literal notranslate"><span class="pre">partial_fit</span></code> method of <a class="reference internal" href="../modules/generated/sklearn.linear_model.SGDClassifier.html#sklearn.linear_model.SGDClassifier" title="sklearn.linear_model.SGDClassifier"><code class="xref py py-class docutils literal notranslate"><span class="pre">linear_model.SGDClassifier</span></code></a>
when called with <code class="docutils literal notranslate"><span class="pre">average=True</span></code>. By <a class="reference external" href="https://github.com/andylamb">Andrew Lamb</a>.
(<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/5282">#5282</a>)</p></li>
<li><p>Dataset fetchers use different filenames under Python 2 and Python 3 to
avoid pickling compatibility issues. By <a class="reference external" href="https://twitter.com/ogrisel">Olivier Grisel</a>.
(<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/5355">#5355</a>)</p></li>
<li><p>Fixed a bug in <a class="reference internal" href="../modules/generated/sklearn.naive_bayes.GaussianNB.html#sklearn.naive_bayes.GaussianNB" title="sklearn.naive_bayes.GaussianNB"><code class="xref py py-class docutils literal notranslate"><span class="pre">naive_bayes.GaussianNB</span></code></a> which caused classification
results to depend on scale. By <a class="reference external" href="https://staff.washington.edu/jakevdp/">Jake Vanderplas</a>.</p></li>
<li><p>Fixed temporarily <a class="reference internal" href="../modules/generated/sklearn.linear_model.Ridge.html#sklearn.linear_model.Ridge" title="sklearn.linear_model.Ridge"><code class="xref py py-class docutils literal notranslate"><span class="pre">linear_model.Ridge</span></code></a>, which was incorrect
when fitting the intercept in the case of sparse data. The fix
automatically changes the solver to ‘sag’ in this case.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/5360">#5360</a> by <a class="reference external" href="https://github.com/TomDLT">Tom Dupre la Tour</a>.</p></li>
<li><p>Fixed a performance bug in <code class="xref py py-class docutils literal notranslate"><span class="pre">decomposition.RandomizedPCA</span></code> on data
with a large number of features and fewer samples. (<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/4478">#4478</a>)
By <a class="reference external" href="https://amueller.github.io/">Andreas Müller</a>, <a class="reference external" href="https://github.com/lesteve">Loic Esteve</a> and <a class="reference external" href="https://github.com/giorgiop">Giorgio Patrini</a>.</p></li>
<li><p>Fixed bug in <code class="xref py py-class docutils literal notranslate"><span class="pre">cross_decomposition.PLS</span></code> that yielded unstable and
platform dependent output, and failed on <code class="docutils literal notranslate"><span class="pre">fit_transform</span></code>.
By <a class="reference external" href="https://github.com/arthurmensch">Arthur Mensch</a>.</p></li>
<li><p>Fixes to the <code class="docutils literal notranslate"><span class="pre">Bunch</span></code> class used to store datasets.</p></li>
<li><p>Fixed <code class="xref py py-func docutils literal notranslate"><span class="pre">ensemble.plot_partial_dependence</span></code> ignoring the
<code class="docutils literal notranslate"><span class="pre">percentiles</span></code> parameter.</p></li>
<li><p>Providing a <code class="docutils literal notranslate"><span class="pre">set</span></code> as vocabulary in <code class="docutils literal notranslate"><span class="pre">CountVectorizer</span></code> no longer
leads to inconsistent results when pickling.</p></li>
<li><p>Fixed the conditions on when a precomputed Gram matrix needs to
be recomputed in <a class="reference internal" href="../modules/generated/sklearn.linear_model.LinearRegression.html#sklearn.linear_model.LinearRegression" title="sklearn.linear_model.LinearRegression"><code class="xref py py-class docutils literal notranslate"><span class="pre">linear_model.LinearRegression</span></code></a>,
<a class="reference internal" href="../modules/generated/sklearn.linear_model.OrthogonalMatchingPursuit.html#sklearn.linear_model.OrthogonalMatchingPursuit" title="sklearn.linear_model.OrthogonalMatchingPursuit"><code class="xref py py-class docutils literal notranslate"><span class="pre">linear_model.OrthogonalMatchingPursuit</span></code></a>,
<a class="reference internal" href="../modules/generated/sklearn.linear_model.Lasso.html#sklearn.linear_model.Lasso" title="sklearn.linear_model.Lasso"><code class="xref py py-class docutils literal notranslate"><span class="pre">linear_model.Lasso</span></code></a> and <a class="reference internal" href="../modules/generated/sklearn.linear_model.ElasticNet.html#sklearn.linear_model.ElasticNet" title="sklearn.linear_model.ElasticNet"><code class="xref py py-class docutils literal notranslate"><span class="pre">linear_model.ElasticNet</span></code></a>.</p></li>
<li><p>Fixed inconsistent memory layout in the coordinate descent solver
that affected <code class="xref py py-class docutils literal notranslate"><span class="pre">linear_model.DictionaryLearning</span></code> and
<code class="xref py py-class docutils literal notranslate"><span class="pre">covariance.GraphLasso</span></code>. (<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/5337">#5337</a>)
By <a class="reference external" href="https://twitter.com/ogrisel">Olivier Grisel</a>.</p></li>
<li><p><a class="reference internal" href="../modules/generated/sklearn.manifold.LocallyLinearEmbedding.html#sklearn.manifold.LocallyLinearEmbedding" title="sklearn.manifold.LocallyLinearEmbedding"><code class="xref py py-class docutils literal notranslate"><span class="pre">manifold.LocallyLinearEmbedding</span></code></a> no longer ignores the <code class="docutils literal notranslate"><span class="pre">reg</span></code>
parameter.</p></li>
<li><p>Nearest Neighbor estimators with custom distance metrics can now be pickled.
(<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/4362">#4362</a>)</p></li>
<li><p>Fixed a bug in <a class="reference internal" href="../modules/generated/sklearn.pipeline.FeatureUnion.html#sklearn.pipeline.FeatureUnion" title="sklearn.pipeline.FeatureUnion"><code class="xref py py-class docutils literal notranslate"><span class="pre">pipeline.FeatureUnion</span></code></a> where <code class="docutils literal notranslate"><span class="pre">transformer_weights</span></code>
were not properly handled when performing grid-searches.</p></li>
<li><p>Fixed a bug in <a class="reference internal" href="../modules/generated/sklearn.linear_model.LogisticRegression.html#sklearn.linear_model.LogisticRegression" title="sklearn.linear_model.LogisticRegression"><code class="xref py py-class docutils literal notranslate"><span class="pre">linear_model.LogisticRegression</span></code></a> and
<a class="reference internal" href="../modules/generated/sklearn.linear_model.LogisticRegressionCV.html#sklearn.linear_model.LogisticRegressionCV" title="sklearn.linear_model.LogisticRegressionCV"><code class="xref py py-class docutils literal notranslate"><span class="pre">linear_model.LogisticRegressionCV</span></code></a> when using
<code class="docutils literal notranslate"><span class="pre">class_weight='balanced'</span></code> or <code class="docutils literal notranslate"><span class="pre">class_weight='auto'</span></code>.
By <a class="reference external" href="https://github.com/TomDLT">Tom Dupre la Tour</a>.</p></li>
<li><p>Fixed bug <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/5495">#5495</a> when
doing OVR(SVC(decision_function_shape=”ovr”)). Fixed by
<a class="reference external" href="https://github.com/dohmatob">Elvis Dohmatob</a>.</p></li>
</ul>
</div>
</div>
<div class="section" id="api-changes-summary">
<h2>API changes summary<a class="headerlink" href="#api-changes-summary" title="Permalink to this headline">¶</a></h2>
<ul class="simple">
<li><p>Attribute <code class="docutils literal notranslate"><span class="pre">data_min</span></code>, <code class="docutils literal notranslate"><span class="pre">data_max</span></code> and <code class="docutils literal notranslate"><span class="pre">data_range</span></code> in
<a class="reference internal" href="../modules/generated/sklearn.preprocessing.MinMaxScaler.html#sklearn.preprocessing.MinMaxScaler" title="sklearn.preprocessing.MinMaxScaler"><code class="xref py py-class docutils literal notranslate"><span class="pre">preprocessing.MinMaxScaler</span></code></a> are deprecated and won’t be available
from 0.19. Instead, the class now exposes <code class="docutils literal notranslate"><span class="pre">data_min_</span></code>, <code class="docutils literal notranslate"><span class="pre">data_max_</span></code>
and <code class="docutils literal notranslate"><span class="pre">data_range_</span></code>. By <a class="reference external" href="https://github.com/giorgiop">Giorgio Patrini</a>.</p></li>
<li><p>All Scaler classes now have an <code class="docutils literal notranslate"><span class="pre">scale_</span></code> attribute, the feature-wise
rescaling applied by their <code class="docutils literal notranslate"><span class="pre">transform</span></code> methods. The old attribute <code class="docutils literal notranslate"><span class="pre">std_</span></code>
in <a class="reference internal" href="../modules/generated/sklearn.preprocessing.StandardScaler.html#sklearn.preprocessing.StandardScaler" title="sklearn.preprocessing.StandardScaler"><code class="xref py py-class docutils literal notranslate"><span class="pre">preprocessing.StandardScaler</span></code></a> is deprecated and superseded
by <code class="docutils literal notranslate"><span class="pre">scale_</span></code>; it won’t be available in 0.19. By <a class="reference external" href="https://github.com/giorgiop">Giorgio Patrini</a>.</p></li>
<li><p><code class="xref py py-class docutils literal notranslate"><span class="pre">svm.SVC`</span></code> and <a class="reference internal" href="../modules/generated/sklearn.svm.NuSVC.html#sklearn.svm.NuSVC" title="sklearn.svm.NuSVC"><code class="xref py py-class docutils literal notranslate"><span class="pre">svm.NuSVC</span></code></a> now have an <code class="docutils literal notranslate"><span class="pre">decision_function_shape</span></code>
parameter to make their decision function of shape <code class="docutils literal notranslate"><span class="pre">(n_samples,</span> <span class="pre">n_classes)</span></code>
by setting <code class="docutils literal notranslate"><span class="pre">decision_function_shape='ovr'</span></code>. This will be the default behavior
starting in 0.19. By <a class="reference external" href="https://amueller.github.io/">Andreas Müller</a>.</p></li>
<li><p>Passing 1D data arrays as input to estimators is now deprecated as it
caused confusion in how the array elements should be interpreted
as features or as samples. All data arrays are now expected
to be explicitly shaped <code class="docutils literal notranslate"><span class="pre">(n_samples,</span> <span class="pre">n_features)</span></code>.
By <a class="reference external" href="https://github.com/vighneshbirodkar">Vighnesh Birodkar</a>.</p></li>
<li><p><code class="xref py py-class docutils literal notranslate"><span class="pre">lda.LDA</span></code> and <code class="xref py py-class docutils literal notranslate"><span class="pre">qda.QDA</span></code> have been moved to
<a class="reference internal" href="../modules/generated/sklearn.discriminant_analysis.LinearDiscriminantAnalysis.html#sklearn.discriminant_analysis.LinearDiscriminantAnalysis" title="sklearn.discriminant_analysis.LinearDiscriminantAnalysis"><code class="xref py py-class docutils literal notranslate"><span class="pre">discriminant_analysis.LinearDiscriminantAnalysis</span></code></a> and
<a class="reference internal" href="../modules/generated/sklearn.discriminant_analysis.QuadraticDiscriminantAnalysis.html#sklearn.discriminant_analysis.QuadraticDiscriminantAnalysis" title="sklearn.discriminant_analysis.QuadraticDiscriminantAnalysis"><code class="xref py py-class docutils literal notranslate"><span class="pre">discriminant_analysis.QuadraticDiscriminantAnalysis</span></code></a>.</p></li>
<li><p>The <code class="docutils literal notranslate"><span class="pre">store_covariance</span></code> and <code class="docutils literal notranslate"><span class="pre">tol</span></code> parameters have been moved from
the fit method to the constructor in
<a class="reference internal" href="../modules/generated/sklearn.discriminant_analysis.LinearDiscriminantAnalysis.html#sklearn.discriminant_analysis.LinearDiscriminantAnalysis" title="sklearn.discriminant_analysis.LinearDiscriminantAnalysis"><code class="xref py py-class docutils literal notranslate"><span class="pre">discriminant_analysis.LinearDiscriminantAnalysis</span></code></a> and the
<code class="docutils literal notranslate"><span class="pre">store_covariances</span></code> and <code class="docutils literal notranslate"><span class="pre">tol</span></code> parameters have been moved from the
fit method to the constructor in
<a class="reference internal" href="../modules/generated/sklearn.discriminant_analysis.QuadraticDiscriminantAnalysis.html#sklearn.discriminant_analysis.QuadraticDiscriminantAnalysis" title="sklearn.discriminant_analysis.QuadraticDiscriminantAnalysis"><code class="xref py py-class docutils literal notranslate"><span class="pre">discriminant_analysis.QuadraticDiscriminantAnalysis</span></code></a>.</p></li>
<li><p>Models inheriting from <code class="docutils literal notranslate"><span class="pre">_LearntSelectorMixin</span></code> will no longer support the
transform methods. (i.e,  RandomForests, GradientBoosting, LogisticRegression,
DecisionTrees, SVMs and SGD related models). Wrap these models around the
metatransfomer <a class="reference internal" href="../modules/generated/sklearn.feature_selection.SelectFromModel.html#sklearn.feature_selection.SelectFromModel" title="sklearn.feature_selection.SelectFromModel"><code class="xref py py-class docutils literal notranslate"><span class="pre">feature_selection.SelectFromModel</span></code></a> to remove
features (according to <code class="docutils literal notranslate"><span class="pre">coefs_</span></code> or <code class="docutils literal notranslate"><span class="pre">feature_importances_</span></code>)
which are below a certain threshold value instead.</p></li>
<li><p><a class="reference internal" href="../modules/generated/sklearn.cluster.KMeans.html#sklearn.cluster.KMeans" title="sklearn.cluster.KMeans"><code class="xref py py-class docutils literal notranslate"><span class="pre">cluster.KMeans</span></code></a> re-runs cluster-assignments in case of non-convergence,
to ensure consistency of <code class="docutils literal notranslate"><span class="pre">predict(X)</span></code> and <code class="docutils literal notranslate"><span class="pre">labels_</span></code>. By
<a class="reference external" href="https://github.com/vighneshbirodkar">Vighnesh Birodkar</a>.</p></li>
<li><p>Classifier and Regressor models are now tagged as such using the
<code class="docutils literal notranslate"><span class="pre">_estimator_type</span></code> attribute.</p></li>
<li><p>Cross-validation iterators always provide indices into training and test set,
not boolean masks.</p></li>
<li><p>The <code class="docutils literal notranslate"><span class="pre">decision_function</span></code> on all regressors was deprecated and will be
removed in 0.19.  Use <code class="docutils literal notranslate"><span class="pre">predict</span></code> instead.</p></li>
<li><p><code class="xref py py-func docutils literal notranslate"><span class="pre">datasets.load_lfw_pairs</span></code> is deprecated and will be removed in 0.19.
Use <a class="reference internal" href="../modules/generated/sklearn.datasets.fetch_lfw_pairs.html#sklearn.datasets.fetch_lfw_pairs" title="sklearn.datasets.fetch_lfw_pairs"><code class="xref py py-func docutils literal notranslate"><span class="pre">datasets.fetch_lfw_pairs</span></code></a> instead.</p></li>
<li><p>The deprecated <code class="docutils literal notranslate"><span class="pre">hmm</span></code> module was removed.</p></li>
<li><p>The deprecated <code class="docutils literal notranslate"><span class="pre">Bootstrap</span></code> cross-validation iterator was removed.</p></li>
<li><p>The deprecated <code class="docutils literal notranslate"><span class="pre">Ward</span></code> and <code class="docutils literal notranslate"><span class="pre">WardAgglomerative</span></code> classes have been removed.
Use <code class="xref py py-class docutils literal notranslate"><span class="pre">clustering.AgglomerativeClustering</span></code> instead.</p></li>
<li><p><code class="xref py py-func docutils literal notranslate"><span class="pre">cross_validation.check_cv</span></code> is now a public function.</p></li>
<li><p>The property <code class="docutils literal notranslate"><span class="pre">residues_</span></code> of <a class="reference internal" href="../modules/generated/sklearn.linear_model.LinearRegression.html#sklearn.linear_model.LinearRegression" title="sklearn.linear_model.LinearRegression"><code class="xref py py-class docutils literal notranslate"><span class="pre">linear_model.LinearRegression</span></code></a> is deprecated
and will be removed in 0.19.</p></li>
<li><p>The deprecated <code class="docutils literal notranslate"><span class="pre">n_jobs</span></code> parameter of <a class="reference internal" href="../modules/generated/sklearn.linear_model.LinearRegression.html#sklearn.linear_model.LinearRegression" title="sklearn.linear_model.LinearRegression"><code class="xref py py-class docutils literal notranslate"><span class="pre">linear_model.LinearRegression</span></code></a> has been moved
to the constructor.</p></li>
<li><p>Removed deprecated <code class="docutils literal notranslate"><span class="pre">class_weight</span></code> parameter from <a class="reference internal" href="../modules/generated/sklearn.linear_model.SGDClassifier.html#sklearn.linear_model.SGDClassifier" title="sklearn.linear_model.SGDClassifier"><code class="xref py py-class docutils literal notranslate"><span class="pre">linear_model.SGDClassifier</span></code></a>’s <code class="docutils literal notranslate"><span class="pre">fit</span></code>
method. Use the construction parameter instead.</p></li>
<li><p>The deprecated support for the sequence of sequences (or list of lists) multilabel
format was removed. To convert to and from the supported binary
indicator matrix format, use
<a class="reference internal" href="../modules/generated/sklearn.preprocessing.MultiLabelBinarizer.html#sklearn.preprocessing.MultiLabelBinarizer" title="sklearn.preprocessing.MultiLabelBinarizer"><code class="xref py py-class docutils literal notranslate"><span class="pre">MultiLabelBinarizer</span></code></a>.</p></li>
<li><p>The behavior of calling the <code class="docutils literal notranslate"><span class="pre">inverse_transform</span></code> method of <code class="docutils literal notranslate"><span class="pre">Pipeline.pipeline</span></code> will
change in 0.19. It will no longer reshape one-dimensional input to two-dimensional input.</p></li>
<li><p>The deprecated attributes <code class="docutils literal notranslate"><span class="pre">indicator_matrix_</span></code>, <code class="docutils literal notranslate"><span class="pre">multilabel_</span></code> and <code class="docutils literal notranslate"><span class="pre">classes_</span></code> of
<a class="reference internal" href="../modules/generated/sklearn.preprocessing.LabelBinarizer.html#sklearn.preprocessing.LabelBinarizer" title="sklearn.preprocessing.LabelBinarizer"><code class="xref py py-class docutils literal notranslate"><span class="pre">preprocessing.LabelBinarizer</span></code></a> were removed.</p></li>
<li><p>Using <code class="docutils literal notranslate"><span class="pre">gamma=0</span></code> in <a class="reference internal" href="../modules/generated/sklearn.svm.SVC.html#sklearn.svm.SVC" title="sklearn.svm.SVC"><code class="xref py py-class docutils literal notranslate"><span class="pre">svm.SVC</span></code></a> and <a class="reference internal" href="../modules/generated/sklearn.svm.SVR.html#sklearn.svm.SVR" title="sklearn.svm.SVR"><code class="xref py py-class docutils literal notranslate"><span class="pre">svm.SVR</span></code></a> to automatically set the
gamma to <code class="docutils literal notranslate"><span class="pre">1.</span> <span class="pre">/</span> <span class="pre">n_features</span></code> is deprecated and will be removed in 0.19.
Use <code class="docutils literal notranslate"><span class="pre">gamma=&quot;auto&quot;</span></code> instead.</p></li>
</ul>
</div>
<div class="section" id="code-contributors">
<h2>Code Contributors<a class="headerlink" href="#code-contributors" title="Permalink to this headline">¶</a></h2>
<p>Aaron Schumacher, Adithya Ganesh, akitty, Alexandre Gramfort, Alexey Grigorev,
Ali Baharev, Allen Riddell, Ando Saabas, Andreas Mueller, Andrew Lamb, Anish
Shah, Ankur Ankan, Anthony Erlinger, Ari Rouvinen, Arnaud Joly, Arnaud Rachez,
Arthur Mensch, banilo, Barmaley.exe, benjaminirving, Boyuan Deng, Brett Naul,
Brian McFee, Buddha Prakash, Chi Zhang, Chih-Wei Chang, Christof Angermueller,
Christoph Gohlke, Christophe Bourguignat, Christopher Erick Moody, Chyi-Kwei
Yau, Cindy Sridharan, CJ Carey, Clyde-fare, Cory Lorenz, Dan Blanchard, Daniel
Galvez, Daniel Kronovet, Danny Sullivan, Data1010, David, David D Lowe, David
Dotson, djipey, Dmitry Spikhalskiy, Donne Martin, Dougal J. Sutherland, Dougal
Sutherland, edson duarte, Eduardo Caro, Eric Larson, Eric Martin, Erich
Schubert, Fernando Carrillo, Frank C. Eckert, Frank Zalkow, Gael Varoquaux,
Ganiev Ibraim, Gilles Louppe, Giorgio Patrini, giorgiop, Graham Clenaghan,
Gryllos Prokopis, gwulfs, Henry Lin, Hsuan-Tien Lin, Immanuel Bayer, Ishank
Gulati, Jack Martin, Jacob Schreiber, Jaidev Deshpande, Jake Vanderplas, Jan
Hendrik Metzen, Jean Kossaifi, Jeffrey04, Jeremy, jfraj, Jiali Mei,
Joe Jevnik, Joel Nothman, John Kirkham, John Wittenauer, Joseph, Joshua Loyal,
Jungkook Park, KamalakerDadi, Kashif Rasul, Keith Goodman, Kian Ho, Konstantin
Shmelkov, Kyler Brown, Lars Buitinck, Lilian Besson, Loic Esteve, Louis Tiao,
maheshakya, Maheshakya Wijewardena, Manoj Kumar, MarkTab marktab.net, Martin
Ku, Martin Spacek, MartinBpr, martinosorb, MaryanMorel, Masafumi Oyamada,
Mathieu Blondel, Matt Krump, Matti Lyra, Maxim Kolganov, mbillinger, mhg,
Michael Heilman, Michael Patterson, Miroslav Batchkarov, Nelle Varoquaux,
Nicolas, Nikolay Mayorov, Olivier Grisel, Omer Katz, Óscar Nájera, Pauli
Virtanen, Peter Fischer, Peter Prettenhofer, Phil Roth, pianomania, Preston
Parry, Raghav RV, Rob Zinkov, Robert Layton, Rohan Ramanath, Saket Choudhary,
Sam Zhang, santi, saurabh.bansod, scls19fr, Sebastian Raschka, Sebastian
Saeger, Shivan Sornarajah, SimonPL, sinhrks, Skipper Seabold, Sonny Hu, sseg,
Stephen Hoover, Steven De Gryze, Steven Seguin, Theodore Vasiloudis, Thomas
Unterthiner, Tiago Freitas Pereira, Tian Wang, Tim Head, Timothy Hopper,
tokoroten, Tom Dupré la Tour, Trevor Stephens, Valentin Stolbunov, Vighnesh
Birodkar, Vinayak Mehta, Vincent, Vincent Michel, vstolbunov, wangz10, Wei Xue,
Yucheng Low, Yury Zhauniarovich, Zac Stewart, zhai_pro, Zichen Wang</p>
</div>
</div>


      </div>
    <div class="container">
      <footer class="sk-content-footer">
            &copy; 2007 - 2019, scikit-learn developers (BSD License).
          <a href="../_sources/whats_new/v0.17.rst.txt" rel="nofollow">Show this page source</a>
      </footer>
    </div>
  </div>
</div>
<script src="../_static/js/vendor/bootstrap.min.js"></script>

<script>
    window.ga=window.ga||function(){(ga.q=ga.q||[]).push(arguments)};ga.l=+new Date;
    ga('create', 'UA-22606712-2', 'auto');
    ga('set', 'anonymizeIp', true);
    ga('send', 'pageview');
</script>
<script async src='https://www.google-analytics.com/analytics.js'></script>


<script>
$(document).ready(function() {
    /* Add a [>>>] button on the top-right corner of code samples to hide
     * the >>> and ... prompts and the output and thus make the code
     * copyable. */
    var div = $('.highlight-python .highlight,' +
                '.highlight-python3 .highlight,' +
                '.highlight-pycon .highlight,' +
		'.highlight-default .highlight')
    var pre = div.find('pre');

    // get the styles from the current theme
    pre.parent().parent().css('position', 'relative');
    var hide_text = 'Hide prompts and outputs';
    var show_text = 'Show prompts and outputs';

    // create and add the button to all the code blocks that contain >>>
    div.each(function(index) {
        var jthis = $(this);
        if (jthis.find('.gp').length > 0) {
            var button = $('<span class="copybutton">&gt;&gt;&gt;</span>');
            button.attr('title', hide_text);
            button.data('hidden', 'false');
            jthis.prepend(button);
        }
        // tracebacks (.gt) contain bare text elements that need to be
        // wrapped in a span to work with .nextUntil() (see later)
        jthis.find('pre:has(.gt)').contents().filter(function() {
            return ((this.nodeType == 3) && (this.data.trim().length > 0));
        }).wrap('<span>');
    });

    // define the behavior of the button when it's clicked
    $('.copybutton').click(function(e){
        e.preventDefault();
        var button = $(this);
        if (button.data('hidden') === 'false') {
            // hide the code output
            button.parent().find('.go, .gp, .gt').hide();
            button.next('pre').find('.gt').nextUntil('.gp, .go').css('visibility', 'hidden');
            button.css('text-decoration', 'line-through');
            button.attr('title', show_text);
            button.data('hidden', 'true');
        } else {
            // show the code output
            button.parent().find('.go, .gp, .gt').show();
            button.next('pre').find('.gt').nextUntil('.gp, .go').css('visibility', 'visible');
            button.css('text-decoration', 'none');
            button.attr('title', hide_text);
            button.data('hidden', 'false');
        }
    });

	/*** Add permalink buttons next to glossary terms ***/
	$('dl.glossary > dt[id]').append(function() {
		return ('<a class="headerlink" href="#' +
			    this.getAttribute('id') +
			    '" title="Permalink to this term">¶</a>');
	});
  /*** Hide navbar when scrolling down ***/
  // Returns true when headerlink target matches hash in url
  (function() {
    hashTargetOnTop = function() {
        var hash = window.location.hash;
        if ( hash.length < 2 ) { return false; }

        var target = document.getElementById( hash.slice(1) );
        if ( target === null ) { return false; }

        var top = target.getBoundingClientRect().top;
        return (top < 2) && (top > -2);
    };

    // Hide navbar on load if hash target is on top
    var navBar = document.getElementById("navbar");
    var navBarToggler = document.getElementById("sk-navbar-toggler");
    var navBarHeightHidden = "-" + navBar.getBoundingClientRect().height + "px";
    var $window = $(window);

    hideNavBar = function() {
        navBar.style.top = navBarHeightHidden;
    };

    showNavBar = function() {
        navBar.style.top = "0";
    }

    if (hashTargetOnTop()) {
        hideNavBar()
    }

    var prevScrollpos = window.pageYOffset;
    hideOnScroll = function(lastScrollTop) {
        if (($window.width() < 768) && (navBarToggler.getAttribute("aria-expanded") === 'true')) {
            return;
        }
        if (lastScrollTop > 2 && (prevScrollpos <= lastScrollTop) || hashTargetOnTop()){
            hideNavBar()
        } else {
            showNavBar()
        }
        prevScrollpos = lastScrollTop;
    };

    /*** high preformance scroll event listener***/
    var raf = window.requestAnimationFrame ||
        window.webkitRequestAnimationFrame ||
        window.mozRequestAnimationFrame ||
        window.msRequestAnimationFrame ||
        window.oRequestAnimationFrame;
    var lastScrollTop = $window.scrollTop();

    if (raf) {
        loop();
    }

    function loop() {
        var scrollTop = $window.scrollTop();
        if (lastScrollTop === scrollTop) {
            raf(loop);
            return;
        } else {
            lastScrollTop = scrollTop;
            hideOnScroll(lastScrollTop);
            raf(loop);
        }
    }
  })();
});

</script>
    
<script id="MathJax-script" async src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-chtml.js"></script>
    
</body>
</html>